import request from "@/utils/service.js";

// 查询所有列表
export let shoufei = () => {
    return request({
        url: "/shoufei",
        method: "GET"
    })
}
//查询单条数据
export let find = (id) => {
    return request({
        url: "/shoufei/"+id,
        method: "GET",
 
    })
}

// 修改数据
export let xiugaiwuye = (id, wuyefee) => {
    return request({
        url: "/shoufei/" + id,
        method: "PATCH",
        data: {
            wuyefee
        }
    })
}
export let xiugaiwater = (id, waterfee) => {
    return request({
        url: "/shoufei/" + id,
        method: "PATCH",
        data: {
            waterfee
        }
    })
}

export let xiugaiwatersituation = (id, watersituation) => {
    return request({
        url: "/shoufei/" + id,
        method: "PATCH",
        data: {
            watersituation
        }
    })
}

export let xiugaiwuyesituation = (id, wuyesituation) => {
    return request({
        url: "/shoufei/" + id,
        method: "PATCH",
        data: {
            wuyesituation
        }
    })
}

// 添加数据
export let addwater = (id,username,timestart,timeend,watersituation,house,waterfee) => {
    return request({
        url: "/shoufei",
        method: "POST",
        data: {
            id,username,timestart,timeend,watersituation,house,waterfee
        }
    })
}

export let addwuye = (id,username,timestart,timeend,wuyesituation,house,wuyefee) => {
    return request({
        url: "/shoufei",
        method: "POST",
        data: {
            id,username,timestart,timeend,wuyesituation,house,wuyefee
        }
    })
}


// 删除数据
export let del = (id) => {
    return request({
        url: "/shoufei/" + id,
        method: "DELETE",
    })
}
